<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07-Vue的列表渲染</title>
    <script src="../js/vue.js"></script>
</head>
<body>
<!--1.准备一个div容器-->
<div id="app">
    <ul>
        <li v-for="item in nums">{{item}}</li>
    </ul>

    <select name="" id="user">
        <option v-for="(i,index) in userList">
            {{i.id}}--{{i.name}}--{{i.address}}
        </option>
    </select>
</div>
<script>
    <!--2.准备一个Vue对象和容器绑定-->
    const vm = new Vue({
        el: "#app",
        data: {
            nums:[1,2,3,4],
            userList:[
                {id:"001",name:"zyh",address:"武汉"},
                {id:"002",name:"cxk",address:"美国"},
                {id:"003",name:"dz",address:"理塘"},
            ]
        },
        methods: {},
    });
</script>
</body>
</html>